package net.qktianxia.component.logger.demo;

import net.qktianxia.component.logger.IFormatStrategy;
import net.qktianxia.component.logger.ILogStrategy;
import net.qktianxia.component.logger.orhanobut.logcat.LogcatLogStrategy;

/**
 * Created by xiaolong on 2018/8/27.
 * email：xinxiaolong123@foxmail.com
 */

public class MyFormatStrategy implements IFormatStrategy {

    String line = "*****===========================*****";

    @Override
    public void log(int priority, String tag, String message) {

        for (int i = 0; i <= 2; i++) {
            String text = (i == 1) ? message : line;
            getLogStrategy().log(priority,tag,text);
        }
    }

    @Override
    public ILogStrategy getLogStrategy() {
        return new LogcatLogStrategy();
    }

}
